package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OLiveVideoMapper;
import com.education.online.pojo.OLiveVideo;
import com.education.online.service.OLiveVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 职业达人视频表 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:49
 */
@Service
public class OLiveVideoServiceImpl implements OLiveVideoService {

    @Autowired
    private OLiveVideoMapper oLiveVideoMapper;

    @Override
    public List<OLiveVideo> selectOLiveVideoByUserId(Integer userID) {
        return oLiveVideoMapper.selectOLiveVideoByUserId(userID);
    }

    //查询职业达人视频表信息
    @Override
    public OLiveVideo selectOLiveVideoById(Integer id) {
        return oLiveVideoMapper.selectOLiveVideoById(id);
    }

    // 查询职业达人视频表列表
    @Override
    public List<OLiveVideo> selectOLiveVideoList(OLiveVideo oLiveVideo) {
        return oLiveVideoMapper.selectOLiveVideoList(oLiveVideo);
    }

    // 新增职业达人视频表
    @Override
    public int insertOLiveVideo(OLiveVideo oLiveVideo) {
        return oLiveVideoMapper.insertOLiveVideo(oLiveVideo);
    }

    //修改职业达人视频表
    @Override
    public int updateOLiveVideo(OLiveVideo oLiveVideo) {
        return oLiveVideoMapper.updateOLiveVideo(oLiveVideo);
    }

    //删除职业达人视频表对象
    @Override
    public int deleteOLiveVideoByIds(String ids) {
        return oLiveVideoMapper.deleteOLiveVideoByIds(Convert.toStrArray(ids));
    }
}